<template>
  <div class="aa">
    <h1>欢迎来到智能社区</h1>
    <div class="features">
      <div class="feature">
        <i class="fas fa-users"></i>
        <h2>社区活动</h2>
        <p>获取最新的社区活动、新闻和公告。</p>
        <router-link to="/events" class="btn">查看活动</router-link>
      </div>
      <div class="feature">
        <i class="fas fa-home"></i>
        <h2>物业管理</h2>
        <p>管理物业详情、维修请求和付款。</p>
        <router-link to="/property" class="btn">管理物业</router-link>
      </div>
      <div class="feature">
        <i class="fas fa-shopping-cart"></i>
        <h2>社区市场</h2>
        <p>在社区市场买卖和交换物品。</p>
        <router-link to="/marketplace" class="btn">前往市场</router-link>
      </div>
      <div class="feature">
        <i class="fas fa-comments"></i>
        <h2>社区论坛</h2>
        <p>参与社区论坛讨论和交流。</p>
        <router-link to="/forum" class="btn">进入论坛</router-link>
      </div>
      <div class="feature">
        <i class="fas fa-bell"></i>
        <h2>社区通知</h2>
        <p>接收重要的社区通知和消息。</p>
        <router-link to="/notifications" class="btn">查看通知</router-link>
      </div>
      <div class="feature">
        <i class="fas fa-utensils"></i>
        <h2>社区美食</h2>
        <p>发现社区附近的美食和餐馆。</p>
        <router-link to="/food" class="btn">探索美食</router-link>
      </div>
    </div>
  </div>
</template>

<script setup></script>

<style scoped>
.aa {
  /* width: 100%; */
  /* height: 100%; */
  text-align: center;
  padding: 20px;
}

.features {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  margin-top: 50px;
}

.feature {
  flex-basis: 355px;
  padding: 20px;
  margin: 10px 10px; /* 增加了左右间距 */
  background-color: #f5f5f5;
  border-radius: 10px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.feature:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 10px rgba(0, 0, 0, 0.1);
}

.feature i {
  font-size: 50px;
  margin-bottom: 20px;
  color: #007bff;
  transition: color 0.3s ease;
}

.feature:hover i {
  color: #0056b3;
}

.feature h2 {
  margin-bottom: 10px;
  font-size: 24px;
  color: #333;
}

.feature p {
  color: #888;
  margin-bottom: 20px;
}

.btn {
  display: inline-block;
  padding: 10px 20px;
  background-color: #007bff;
  color: #fff;
  text-decoration: none;
  border-radius: 5px;
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.btn:hover {
  background-color: #0056b3;
  transform: scale(1.1);
}
</style>
